﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Shapes;
using System.Windows.Media;
using System.Collections.ObjectModel;

namespace ClipperBaseUI.Chart
{
    /// <summary>
    /// 直线
    /// </summary>
    public class StraightLineSeries:Series
    {
        public StraightLineSeries(string name, ChartArea chartArea)
        {
            Name = name;
            ChartArea = chartArea;
        }
        public override void ShowLine(ObservableCollection<Point> points)
        {
            //bool isFirstPoint = true;
            //Point lastPointPosition = new Point();//上一个点的位置
            //foreach (Point point1 in DataPoint)//反向
            //{
                
            //    //位置坐标对齐圆心所以要减去2
            //    Point pointPosition = DataToPrintPoint(point1, 2, 1);
            //    //连线
            //    if (!isFirstPoint)
            //    {
            //        Line line = new Line()
            //        {
            //            StrokeThickness = 1,
            //            Stroke = Brushes.Black
            //        };
            //        line.X1 = lastPointPosition.X + 2;//连接圆心
            //        line.Y1 = lastPointPosition.Y + 2;
            //        line.X2 = pointPosition.X + 2;
            //        line.Y2 = pointPosition.Y + 2;
            //        ChartArea.DataArea.Children.Add(line);
            //    }
            //    else
            //    {
            //        isFirstPoint = false;
            //    }
            //    lastPointPosition = pointPosition;
            //}
            throw new NotImplementedException();
        }

    }
}
